@import '~antd/lib/style/themes/default.less';

html,
body,
#root {
  height: 100%;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.globalSpin {
  width: 100%;
  margin: 40px 0 !important;
}
.flex {
  display: flex;
}
.flex1 {
  flex: 1;
}
ul,
ol {
  list-style: none;
}
em,
i {
  font-style: normal;
}
@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;
    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;
        > span {
          display: block;
        }
      }
    }
  }
}
// 绿色字体
.green {
  color: @success-color;
}
// 红色字体
.red {
  color: @error-color;
}
// 禁用字体
.disabled {
  color: @disabled-color;
}
// icon
.anticon-minus-circle {
  color: @error-color;
}
// 文件列表
.fileList {
  line-height: 0.64rem;
  font-size: 0.36rem;
  a {
    padding: 0 0.2rem;
  }
}
//页头
.ant-tabs {
  font-size: 0.32rem !important;
  margin: 0 0 -1px 0 !important;
}
.ant-tabs-bar {
  margin: 0 !important;
  .ant-tabs-tab {
    margin: 0 0.64rem 0 0 !important;
    font-size: 0.38rem;
    height: 1.1rem !important;
    line-height: 1.1rem !important;
    padding: 0 0.32rem !important;
  }
}

.ant-tabs-extra-content {
  line-height: 0.86rem !important;
}
.ant-tabs.ant-tabs-card {
  .ant-tabs-bar {
    .ant-tabs-tab {
      margin-right: 0.04rem !important;
    }
    .ant-tabs-tab-active {
      height: 1.03rem !important;
      line-height: 1.03rem;
    }
    .ant-tabs-nav-container {
      height: 1.03rem !important;
      line-height: 1.03rem;
    }
  }
}
// 卡片
.ant-card {
  .ant-card-body {
    padding: 0.2rem 0.4rem !important;
  }
  .ant-card-actions > li {
    margin: 0.24rem 0;
    span {
      font-size: 0.36rem;
      line-height: 0.44rem;
      min-width: 0.64rem;
      .anticon {
        font-size: 0.36rem;
        line-height: 0.44rem;
      }
    }
  }
}
// 表单
.ant-form {
  label {
    font-size: 0.36rem !important;
  }
  .ant-form-item {
    margin-bottom: 0.5rem;
    font-size: 0.36rem;
  }
  .ant-form-explain {
    position: absolute;
  }
}
.form-inline {
  :global {
    .ant-form-item {
      margin-bottom: 0;
    }
  }
}
//按钮
.ant-btn {
  font-size: 0.4rem !important;
  height: 0.86rem !important;
  padding: 0 0.36rem !important;
  border-radius: 0.12rem !important;
  .anticon + span {
    margin-left: 0.16rem !important;
  }
}
.ant-btn-lg {
  height: 1.06rem !important;
}
.ant-btn-sm {
  padding: 0 0.2rem !important;
  font-size: 0.36rem !important;
  height: 0.64rem !important;
}
.ant-input-search-enter-button + .ant-input-group-addon .ant-input-search-button,
.ant-input-search-enter-button input + .ant-input-group-addon .ant-input-search-button {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}
// 步骤条
.ant-steps {
  .ant-steps-item {
    padding: 0.1rem;
  }
  .ant-steps-item-icon {
    width: 0.8rem;
    height: 0.8rem;
    line-height: 0.8rem;
    border-radius: 0.8rem;
    font-size: 0.38rem;
    margin-right: 0.16rem;
  }
  .ant-steps-item-title {
    font-size: 0.38rem;
    padding-right: 0.32rem;
    line-height: 0.8rem;
    &:after {
      top: 0.4rem;
    }
  }
  .ant-steps-item-description {
    font-size: 0.3rem;
  }
}
.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item {
  margin-right: 0.32rem !important;
}
// 输入
.ant-input {
  padding: 0.08rem 0.22rem !important;
  height: 0.86rem !important;
  font-size: 0.36rem !important;
}
.ant-input-lg {
  padding: 0.12rem 0.22rem !important;
  height: 1.06rem !important;
  font-size: 0.36rem !important;
}
.ant-input-number {
  height: 0.86rem !important;
  font-size: 0.36rem !important;
  .ant-input-number-input {
    height: 0.8rem !important;
    padding: 0 22px 0 0.22rem !important;
  }
}
.ant-input-affix-wrapper {
  font-size: 0.36rem;
  .ant-input-affix-wrapper .ant-input:not(:last-child) {
    padding-right: 0.6rem;
  }
  .ant-input-search:not(.ant-input-search-small) > .ant-input-suffix {
    right: 0.24rem;
  }
}
// 带前缀的input
.ant-input-group-addon {
  padding: 0 0.22rem;
  font-size: 0.36rem;
}
// 带搜索按钮的input
.ant-input-search.ant-input-search-enter-button > .ant-input {
  padding-right: 1.8rem;
}
// 级联选择
.ant-cascader-picker {
  font-size: 0.34rem !important;
  .ant-cascader-picker-label {
    height: 0.6rem;
    line-height: 0.6rem;
    margin-top: -0.3rem;
    padding: 0 0.6rem 0 0.24rem;
  }
  .ant-cascader-picker-clear,
  .ant-cascader-picker-arrow {
    right: 0.24rem;
    width: 0.36rem;
    height: 0.36rem;
    font-size: 0.36rem;
    margin-top: -0.16rem;
    line-height: 0.36rem;
  }
}
.ant-cascader-menus {
  font-size: 0.3rem !important;
}
//多选
.ant-checkbox-wrapper {
  font-size: 0.36rem !important;
}
.ant-checkbox-wrapper + span,
.ant-checkbox + span {
  padding-left: 0.16rem !important;
  padding-right: 0.16rem !important;
}
.ant-checkbox-group-item {
  margin-right: 0.16rem !important;
}
// 单选
.ant-radio-group {
  font-size: 0.36rem !important;
}
.ant-radio-wrapper {
  font-size: 0.36rem !important;
  margin-right: 0.16rem;
}
.ant-radio {
  font-size: 0.36rem !important;
  vertical-align: middle !important;
}
span.ant-radio + * {
  padding-left: 0.16rem !important;
  padding-right: 0.16rem !important;
}
.ant-radio-button-wrapper {
  font-size: 0.4rem !important;
  height: 0.86rem !important;
  line-height: 0.82rem !important;
  padding: 0 0.36rem !important;
}
// 下拉
.ant-select {
  font-size: 0.36rem !important;
  .ant-select-selection--single {
    height: 0.86rem;
    .ant-select-selection__clear {
      right: 0.24rem;
      width: 0.36rem;
      height: 0.36rem;
      font-size: 0.36rem;
      margin-top: -0.16rem;
      line-height: 0.36rem;
    }
  }
  .ant-select-selection__rendered {
    margin-left: 0.22rem;
    margin-right: 0.22rem;
    line-height: 0.82rem;
  }
  .ant-select-selection-selected-value {
    padding-right: 0.4rem;
  }
  .ant-select-arrow {
    right: 0.22rem;
    margin-top: -0.16rem;
    font-size: 0.36rem;
  }
}
.ant-select-selection--multiple {
  min-height: 0.86rem !important;
  padding-bottom: 0.06rem !important;
  .ant-select-selection__rendered {
    margin-left: 0.1rem !important;
    margin-bottom: -0.06rem !important;
  }
  .ant-select-selection__placeholder {
    margin-left: 0.12rem !important;
  }
  ul > li,
  .ant-select-selection__rendered > ul > li {
    margin-top: 0.06rem !important;
    height: 0.68rem !important;
    line-height: 0.64rem !important;
  }
}
.ant-select-selection__placeholder,
.ant-select-search__field__placeholder {
  right: 0.36rem !important;
}
.ant-select-dropdown {
  font-size: 0.3rem !important;
  .ant-select-dropdown-menu-item {
    padding: 0.1rem 0.24rem;
    line-height: 0.44rem;
  }
}
.ant-select-tree {
  font-size: 0.3rem !important;
}
.ant-tree {
  font-size: 0.36rem !important;
}
// 开关
.ant-switch {
  height: 0.65rem !important;
  min-width: 0.65rem !important;
  line-height: 0.65rem !important;
  .ant-switch-inner {
    font-size: 0.33rem !important;
    margin-left: 0.6rem !important;
    margin-right: 0.2rem !important;
    padding: 0 0.1rem;
  }
  &:after {
    width: 0.5rem !important;
    height: 0.5rem !important;
    left: 0.06rem !important;
    top: 0.06rem !important;
    border-radius: 50% !important;
  }
}
.ant-switch-checked {
  .ant-switch-inner {
    margin-left: 0.2rem !important;
    margin-right: 0.6rem !important;
  }
  &:after {
    left: 100% !important;
    margin-left: -0.06rem !important;
  }
}
// 表格
.ant-table {
  font-size: 0.32rem !important;
  table {
    .ant-table-thead tr th,
    .ant-table-tbody tr td {
      padding: 0.2rem 0.1rem;
    }
  }
}
.ant-table-fixed-right .ant-table-body-outer {
  margin-bottom: 0 !important;
}
.ant-table-fixed-header .ant-table-body-inner {
  overflow-x: hidden !important;
}
.ant-table-small {
  .ant-table-thead tr th,
  .ant-table-tbody tr td {
    padding: 0.16rem !important;
  }
}
// 华丽的分割线
.ant-divider,
.ant-divider-vertical {
  font-size: 0.28rem;
  margin: 0 0.16rem;
}
// 分页器
.ant-table-pagination.ant-pagination {
  margin: 0.32rem 0 0 !important;
}
.ant-pagination {
  font-size: 0.34rem !important;
  .ant-pagination-total-text {
    height: 0.68rem;
    line-height: 0.66rem;
    margin-right: 0.16rem;
  }
  .ant-pagination-prev,
  .ant-pagination-jump-prev,
  .ant-pagination-jump-next {
    margin-right: 0.16rem;
  }
  .ant-pagination-prev,
  .ant-pagination-next,
  .ant-pagination-jump-prev,
  .ant-pagination-jump-next {
    min-width: 0.68rem;
    height: 0.68rem;
    line-height: 0.68rem;
  }
  .ant-pagination-prev .ant-pagination-item-link:after,
  .ant-pagination-next .ant-pagination-item-link:after {
    font-size: 0.24rem !important;
    height: 0.66rem !important;
  }
  .ant-pagination-item {
    min-width: 0.68rem;
    height: 0.68rem;
    line-height: 0.66rem;
    margin-right: 0.16rem;
    a {
      margin: 0 0.12rem;
    }
  }
}
// 提示框
.ant-popover-message {
  font-size: 0.36rem !important;
  .ant-popover-message-title {
    padding-left: 0.6rem !important;
  }
}
.ant-popover-buttons button {
  margin-left: 0.16rem !important;
}
.ant-popover {
  font-size: 0.36rem !important;
  .ant-popover-title {
    padding: 0.1rem 0.2rem;
    min-height: 0.64rem;
  }
  .ant-popover-inner-content {
    padding: 0.2rem 0.3rem;
  }
}
// 标签
.ant-tag {
  font-size: 0.36rem !important;
  line-height: 0.7rem !important;
  height: 0.7rem !important;
  padding: 0 0.14rem !important;
  margin: 0 0.16rem 0.1rem 0 !important;
  .anticon-cross {
    font-size: 0.36rem !important;
  }
}
// 警告提示
.ant-alert {
  font-size: 0.36rem !important;
  padding: 0.1rem 0.3rem 0.1rem 0.8rem !important;
}
.ant-alert.ant-alert-no-icon {
  padding: 0.1rem 0.3rem !important;
}
.ant-alert-icon {
  top: 0.2rem !important;
  left: 0.3rem !important;
}
.ant-alert-close-icon {
  font-size: 0.36rem !important;
  right: 0.3rem !important;
  top: 0.1rem !important;
  line-height: 0.46rem !important;
}
// 弹窗
.ant-modal {
  font-size: 0.32rem;
  padding-bottom: 0;
  .ant-modal-close-x {
    width: 1.2rem;
    height: 1.2rem;
    line-height: 1.2rem;
    font-size: 0.4rem;
  }
  .ant-modal-header {
    padding: 0.32rem 0.48rem;
    .ant-modal-title {
      font-size: 0.4rem;
      line-height: 0.5rem;
      margin-right: 0.5rem;
    }
  }
  .ant-modal-body {
    padding: 0.48rem;
    font-size: 0.32rem;
  }
  .ant-modal-footer {
    padding: 0.2rem 0.32rem;
  }
}
// 穿梭框
.ant-transfer {
  font-size: 0.32rem !important;
  .ant-transfer-list {
    padding-top: 0.8rem !important;
    .ant-transfer-list-header {
      height: 0.8rem;
      line-height: 0.8rem;
      padding: 0 0.2rem !important;
    }
    .ant-transfer-list-body {
      font-size: 0.32rem !important;
    }
    .ant-transfer-list-body-with-search {
      padding-top: 1rem !important;
      .ant-transfer-list-search-action {
        font-size: 0.36rem !important;
        line-height: 0.86rem !important;
      }
    }
  }
}

/* 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸 */
::-webkit-scrollbar {
  width: 0.16rem;
  height: 0.16rem;
}

/* 定义滚动条轨道 内阴影+圆角 */
::-webkit-scrollbar-track {
  border-radius: 0.16rem;
  background: @normal-color;
}

/* 定义滑块 内阴影+圆角 */
::-webkit-scrollbar-thumb {
  border-radius: 0.16rem;
  -webkit-box-shadow: 0 0 0.04rem 0 #a7acb1;
  background: #a7acb1;
  box-shadow: 0 0 0.04rem 0 #a7acb1;
}
